/**
 * @author        lx <1154354121@qq.com>
 * @date          2025-04-15 09:33:28
 * Copyright © YourCompanyName All rights reserved
 */
import { NextResponse } from 'next/server';

export async function GET(
  request: Request,
  { params }: { params: { id: string } }
) {
  const { id } = await params;

  console.log('request', id);

  // 模拟数据库
  if (id) {
    return NextResponse.json({
      id,
      title: `订单 ${id}`,
      status: '待处理',
    });
  }

  return NextResponse.json({ message: '订单不存在' }, { status: 404 });
}
